#include<stdio.h>
#include<unistd.h>
#include<signal.h>


void sigcallback(int sig){
    printf("i am sig:%d \n",sig);
}
int main(){

    signal(2,sigcallback);
    signal(40,sigcallback);

    
    sigset_t set;
    sigemptyset(&set);
    sigaddset(&set,2);
    sigaddset(&set,40);
    sigprocmask(SIG_BLOCK,&set,NULL);
    getchar();
    

    sigset_t oldset;
    sigemptyset(&oldset);
    sigprocmask(SIG_SETMASK,&oldset,NULL);


    while(1){
        printf("i am main\n");
        sleep(1);
    }
    return 0;
}
